import React, { PureComponent } from 'react';
import { Card, Form, Input, Select, Button, AutoComplete } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout'; //引入面包屑
import { connect } from 'dva'; //引入装饰器
@connect(({ employe, loading }) => ({
  detail: employe.currentDetail,
}))
export default class Empployedetail extends PureComponent {
  componentDidMount() {
    const { dispatch } = this.props;
    console.log(this.props.match.params.id);
    dispatch({
      type: 'employe/employedetail',
      payload: this.props.match.params.id,
    });
  }
  render() {
    const {detail}=this.props;
    return (
      <PageHeaderLayout
        title="工作人员详情"
        content="工作人员详情页用于收集组织机构详细信息，工作人员详情页常见于数据项基本的全面信息全面信息。"
      >
        <Card>
          <h1>ID：{detail.id}</h1>
          <p>员工名称：{detail.name}</p>
          <p>账户：{detail.account}</p>
          <p>工号：{detail.number}</p>
          <p>性别：{detail.sex}</p>
          <p>在线系统：{detail.tags}</p>
          <p>状态：{detail.status}  [0:'未激活', 1:'已禁用', 2:'已激活', 3:'密码过期']</p>
        </Card>
      </PageHeaderLayout>
    );
  }
}
